<!-- application/layouts/scripts/layout.phtml -->
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
	<title>La Ferreria - Gestió</title>
	<?
	echo $this->headLink()->appendStylesheet('/css/global.css')
						  ->appendStylesheet('/js/jqwidgets/styles/jqx.base.css');

	//El �ltimo es el primero que se muestra
	echo $this->headScript()->appendFile('/js/gettheme.js')							
							->appendFile('/js/jquery-1.7.2.min.js')
							->appendFile('/js/global.js')
							->appendFile('/js/jqwidgets/jqxcore.js')
							->appendFile('/js/jqwidgets/jqxdata.js')
							->appendFile('/js/jqwidgets/jqxexpander.js')
							->appendFile('/js/jqwidgets/jqxnavigationbar.js')
							->appendFile('/js/jqwidgets/jqxtabs.js')
							->appendFile('/js/jqwidgets/jqxmenu.js')
							->appendFile('/js/jqwidgets/jqxmenu.js')
							->appendFile('/js/jqwidgets/jqxscrollbar.js')
							->appendFile('/js/jqwidgets/jqxbuttons.js')
							->appendFile('/js/jqwidgets/jqxlistbox.js')
							->appendFile('/js/jqwidgets/jqxdropdownlist.js')
							->appendFile('/js/jqwidgets/jqxdropdownlist.js')
							->appendFile('/js/jqwidgets/jqxscrollbar.js')
							->appendFile('/js/jqwidgets/jqxbuttons.js')
							->appendFile('/js/jqwidgets/jqxwindow.js')
							->appendFile('/js/jqwidgets/jqxvalidator.js')
							->appendFile('/js/jqwidgets/jqxgrid.js')
							->appendFile('/js/jqwidgets/jqxgrid.filter.js')
							->appendFile('/js/jqwidgets/jqxgrid.sort.js')
							->appendFile('/js/jqwidgets/jqxgrid.pager.js')
							->appendFile('/js/jqwidgets/jqxgrid.columnsresize.js')
							->appendFile('/js/jqwidgets/jqxgrid.selection.js')
							->appendFile('/js/jqwidgets/jqxdatetimeinput.js')
							->appendFile('/js/jqwidgets/jqxcalendar.js')
							->appendFile('/js/jqwidgets/jqxtooltip.js')
							->appendFile('/js/jqwidgets/globalization/jquery.global.js');
	?>
	<script type="text/javascript">		
        $(document).ready(function () {
        	var theme = getTheme();
			var alto = 110;
			
			$('#jqxTabs').jqxTabs({
		    	theme: theme, 
		        width: "99%",
		        height: ($(window).height()-alto),
		        position: 'top'
		   	});
	       
		    $(window).resize(function() {
		    	delay(function(){
		    		$('#jqxTabs').jqxTabs({ height: 0 });                	
		    		$('#jqxTabs').jqxTabs({ width: "99%", height: ($(window).height()-alto)});
		    		location.reload();
		    	}, 500);
		    });            

            // Create jqxNavigationBar
            $("#jqxNavigationBar").jqxNavigationBar({ 
                width: 220,
                expandMode:"multiple",
                expandedIndexes: [0, 1, 2, 3, 4],
                expandedIndex: -1,
                theme: theme 
            });
        });
    </script>
</head>
<body>
	<div id="content-header">
		<div>
			<a id="logo" href="http://www.laferreria.com"> </a>
		</div>
		<div id="cerrarSesion"><a href="/login/logout">Tancar sessió</a></div>
	</div>
	<div id="wrapper">
		<div id="content-left">
			<!-- Menú lateral -->
			<div id="jqxNavigationBar">
				<?php echo $this->menuLat?>
			</div>
		</div>
		<div id="content-right">
			<!-- Contenido principal -->
			<?php echo $this->layout()->content ?>		               
		</div>
	</div>
</body>
</html>